]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/spinner-content: Disconnect timeline callbacks when the spinner is destroyed
authorAlessandro Astone <alessandro.astone@canonical.com>
Fri, 12 Sep 2025 09:00:18 +0000 (11:00 +0200)
committerAlessandro Astone <alessandro.astone@canonical.com>
Fri, 12 Sep 2025 12:36:37 +0000 (14:36 +0200)
The ClutterFrameClock might still have active references on the ClutterTimeline
when the StSpinnerContent is freed.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8651
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3872>

src/st/st-spinner-content.c

index 76fe3f2dab40e556471a494ccb45a10942b49b38..925667c25c818c40fbce86c4e5c141f25938d058 100644 (file)
@@ -131,7 +131,7 @@ st_spinner_content_set_actor (StSpinnerContent *spinner,
       clutter_timeline_set_repeat_count (spinner->timeline, -1);
       clutter_timeline_set_progress_mode (spinner->timeline, CLUTTER_LINEAR);
 
-      g_signal_connect (spinner->timeline, "new-frame", G_CALLBACK (new_frame_cb), spinner);
+      g_signal_connect_object (spinner->timeline, "new-frame", G_CALLBACK (new_frame_cb), spinner, 0);
 
       if (clutter_actor_is_mapped (actor))
         clutter_timeline_start (spinner->timeline);